package com.zyw.auth.model;

import org.hibernate.validator.constraints.NotBlank;
import org.hibernate.validator.constraints.NotEmpty;

import java.io.Serializable;
import java.util.List;

public class RoleEditModel implements Serializable {

    private static final long serialVersionUID = 4613572147818036059L;

    private Long roleId;
    @NotBlank(message = "角色代码不能为空")
    private String roleCode;
    @NotBlank(message = "角色名称不能为空")
    private String roleName;
    private String description;
    @NotEmpty(message = "权限不能为空")
    private List<Long> rightsIds;

    public Long getRoleId() {
        return roleId;
    }

    public void setRoleId(Long roleId) {
        this.roleId = roleId;
    }

    public String getRoleCode() {
        return roleCode;
    }

    public void setRoleCode(String roleCode) {
        this.roleCode = roleCode;
    }

    public String getRoleName() {
        return roleName;
    }

    public void setRoleName(String roleName) {
        this.roleName = roleName;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public List<Long> getRightsIds() {
        return rightsIds;
    }

    public void setRightsIds(List<Long> rightsIds) {
        this.rightsIds = rightsIds;
    }

    @Override
    public String toString() {
        return "RoleEditModel{" +
                "roleId=" + roleId +
                ", roleCode='" + roleCode + '\'' +
                ", roleName='" + roleName + '\'' +
                ", description='" + description + '\'' +
                ", rightsIds=" + rightsIds +
                '}';
    }
}
